package utildate;

import java.util.Date;

public class UtilDateDemo {

    public static void main(String[] args) {

        Date d = new Date();
        System.out.println(d); //打印当前日期时间的字符串
        System.out.println(d.getTime()); //返回距离1970-01-01 00:00:00 的毫秒数
    }
}
